﻿@model IRIS.Models.IEContentIECategoriesIntPagesViewModel

@{
    ViewBag.Title = "IRIS Ættleiðingartengd fræðsla";
}

<h2>Page</h2>

@if (Model.m_Contents.Count() > 0)
{ 
	foreach (var item in Model.m_Contents)
	{ 
			
		<div class="news">
			<h2>@Html.ActionLink(item.ContentTitle, "Details", new { id = item.ID })<span class="contentdate">
			@{ var date = item.Created.ToShortDateString();}
				@date</span> </h2>
			<h3><b>Höfundur: </b>@item.Author</h3>
			<span><b>Flokkur: </b>@item.ContentCategory.Name</span>
			<h6>Stutt lýsing:</h6>
			<p>@{ var segment = item.Description; }
			@Html.Raw(segment) 
			</p>          
		</div>
	}
}
else
{
	<p>Engar greinar fundust</p>
}
<!--Pages-->
<ul>
@if (Model.m_Pages > 0)
{

	for (int i = 0; i < Model.m_Pages; i++) 
	{
		<!--Workaround-->
		<li><a href="?thePage=@i&theNews=false">@(i + 1)</a></li>
    }
}
</ul>